package com.example.money.Controller;

import com.example.money.Entity.table;
import com.example.money.Service.AllService;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


import java.util.List;

@RestController
public class AllController {
    /**
     * 这是请求的总表数据
     * GET拿到数据快
     * 靠！三天不写直接忘了
     * 这是让Ajax拿到数据
     */
    @Autowired
    private AllService AllService;

    @GetMapping(value = "/all")
    public List<table> All(HttpServletRequest request){
//        String ip=request.getRemoteAddr();
//        System.out.println("访问者"+ip);
        return AllService.All();
    }
}
